.class Lcom/example/m6wmr/ChangecityActivity$2;
.super Ljava/lang/Object;
.source "ChangecityActivity.java"

# interfaces
.implements Landroid/widget/AdapterView$OnItemClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/ChangecityActivity;->onCreate(Landroid/os/Bundle;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Landroid/widget/AdapterView$OnItemClickListener;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/ChangecityActivity;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/ChangecityActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    .line 139
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 10
    .param p2, "arg1"    # Landroid/view/View;
    .param p3, "arg2"    # I
    .param p4, "arg3"    # J
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;",
            "Landroid/view/View;",
            "IJ)V"
        }
    .end annotation

    .prologue
    .local p1, "arg0":Landroid/widget/AdapterView;, "Landroid/widget/AdapterView<*>;"
    const/4 v9, 0x1

    .line 142
    invoke-static {}, Lmyapp/Util;->isFastDoubleClick()Z

    move-result v4

    if-eqz v4, :cond_0

    .line 177
    :goto_0
    return-void

    .line 145
    :cond_0
    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->schls:Ljava/util/List;
    invoke-static {v4}, Lcom/example/m6wmr/ChangecityActivity;->access$1(Lcom/example/m6wmr/ChangecityActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lbean/searchBean;

    invoke-virtual {v4}, Lbean/searchBean;->getname()Ljava/lang/String;

    move-result-object v3

    .line 149
    .local v3, "showmapname":Ljava/lang/String;
    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    iget-object v5, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->helper:Ldbclass/DBOpenHelper;
    invoke-static {v5}, Lcom/example/m6wmr/ChangecityActivity;->access$4(Lcom/example/m6wmr/ChangecityActivity;)Ldbclass/DBOpenHelper;

    move-result-object v5

    invoke-virtual {v5}, Ldbclass/DBOpenHelper;->getReadableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v5

    .line 150
    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "select * from mapaddress where name=\'"

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "\'"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    const/4 v7, 0x0

    .line 149
    invoke-virtual {v5, v6, v7}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v5

    invoke-static {v4, v5}, Lcom/example/m6wmr/ChangecityActivity;->access$5(Lcom/example/m6wmr/ChangecityActivity;Landroid/database/Cursor;)V

    .line 151
    const/4 v1, 0x0

    .line 152
    .local v1, "goodscount":I
    const/4 v0, 0x1

    .line 153
    .local v0, "checkgd":Z
    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v4}, Lcom/example/m6wmr/ChangecityActivity;->access$6(Lcom/example/m6wmr/ChangecityActivity;)Landroid/database/Cursor;

    move-result-object v4

    if-eqz v4, :cond_3

    .line 154
    :goto_1
    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->cursor:Landroid/database/Cursor;
    invoke-static {v4}, Lcom/example/m6wmr/ChangecityActivity;->access$6(Lcom/example/m6wmr/ChangecityActivity;)Landroid/database/Cursor;

    move-result-object v4

    invoke-interface {v4}, Landroid/database/Cursor;->moveToNext()Z

    move-result v4

    if-nez v4, :cond_2

    .line 160
    :goto_2
    if-eqz v0, :cond_1

    .line 161
    const-string v4, "\u63d2\u6570\u636e"

    const-string v5, "\u5199\u6570\u636e\u5230\u8868\u4e2d"

    invoke-static {v4, v5}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 162
    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->db:Landroid/database/sqlite/SQLiteDatabase;
    invoke-static {v4}, Lcom/example/m6wmr/ChangecityActivity;->access$7(Lcom/example/m6wmr/ChangecityActivity;)Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v5

    .line 163
    const-string v6, "insert into mapaddress (name,lat,lng) values(?,?,?)"

    .line 164
    const/4 v4, 0x3

    new-array v7, v4, [Ljava/lang/Object;

    const/4 v8, 0x0

    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->schls:Ljava/util/List;
    invoke-static {v4}, Lcom/example/m6wmr/ChangecityActivity;->access$1(Lcom/example/m6wmr/ChangecityActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lbean/searchBean;

    invoke-virtual {v4}, Lbean/searchBean;->getname()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v7, v8

    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->schls:Ljava/util/List;
    invoke-static {v4}, Lcom/example/m6wmr/ChangecityActivity;->access$1(Lcom/example/m6wmr/ChangecityActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lbean/searchBean;

    invoke-virtual {v4}, Lbean/searchBean;->getlat()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v7, v9

    const/4 v8, 0x2

    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->schls:Ljava/util/List;
    invoke-static {v4}, Lcom/example/m6wmr/ChangecityActivity;->access$1(Lcom/example/m6wmr/ChangecityActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lbean/searchBean;

    invoke-virtual {v4}, Lbean/searchBean;->getlng()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v7, v8

    .line 162
    invoke-virtual {v5, v6, v7}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;[Ljava/lang/Object;)V

    .line 166
    :cond_1
    const-string v4, "\u9690\u85cf"

    const-string v5, "\u8bbe\u7f6e\u8df3\u8f6c"

    invoke-static {v4, v5}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 167
    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    iget-object v5, v4, Lcom/example/m6wmr/ChangecityActivity;->m:Lmyapp/MyApp;

    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->schls:Ljava/util/List;
    invoke-static {v4}, Lcom/example/m6wmr/ChangecityActivity;->access$1(Lcom/example/m6wmr/ChangecityActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lbean/searchBean;

    invoke-virtual {v4}, Lbean/searchBean;->getname()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v5, v4}, Lmyapp/MyApp;->setsearchMap(Ljava/lang/String;)V

    .line 168
    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    iget-object v5, v4, Lcom/example/m6wmr/ChangecityActivity;->m:Lmyapp/MyApp;

    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->schls:Ljava/util/List;
    invoke-static {v4}, Lcom/example/m6wmr/ChangecityActivity;->access$1(Lcom/example/m6wmr/ChangecityActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lbean/searchBean;

    invoke-virtual {v4}, Lbean/searchBean;->getlat()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v5, v4}, Lmyapp/MyApp;->setsearchLat(Ljava/lang/String;)V

    .line 169
    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    iget-object v5, v4, Lcom/example/m6wmr/ChangecityActivity;->m:Lmyapp/MyApp;

    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->schls:Ljava/util/List;
    invoke-static {v4}, Lcom/example/m6wmr/ChangecityActivity;->access$1(Lcom/example/m6wmr/ChangecityActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lbean/searchBean;

    invoke-virtual {v4}, Lbean/searchBean;->getlng()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v5, v4}, Lmyapp/MyApp;->setsearchLng(Ljava/lang/String;)V

    .line 170
    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    iget-object v4, v4, Lcom/example/m6wmr/ChangecityActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v4, v9}, Lmyapp/MyApp;->setsearch(Z)V

    .line 171
    new-instance v2, Landroid/os/Message;

    invoke-direct {v2}, Landroid/os/Message;-><init>()V

    .line 172
    .local v2, "msg":Landroid/os/Message;
    const/16 v4, 0x6f

    iput v4, v2, Landroid/os/Message;->arg1:I

    .line 173
    sget-object v4, Lcom/example/m6wmr/MainActivity;->h:Landroid/os/Handler;

    invoke-virtual {v4, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 174
    iget-object v4, p0, Lcom/example/m6wmr/ChangecityActivity$2;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    invoke-virtual {v4}, Lcom/example/m6wmr/ChangecityActivity;->finish()V

    goto/16 :goto_0

    .line 155
    .end local v2    # "msg":Landroid/os/Message;
    :cond_2
    const/4 v0, 0x0

    goto/16 :goto_1

    .line 158
    :cond_3
    const/4 v0, 0x1

    goto/16 :goto_2
.end method
